//
//  AppDelegate.swift
//  WatermarkCamera
//
//  Created by AxcLogo on 4/7/2024.
//

import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        AppStateManager.shared.config() // app状态管理
        DateManager.shared.config() // 时间管理器
        MotionTool.shared.config() // 运动管理器
        DBManager.shared.config() // 数据库管理

        if UserDefaults.standard.object(forKey: "TheFirst") == nil {
            let guideVC = GuideVC(nibName: "GuideVC", bundle: .main)
            window?.rootViewController = guideVC
        } else {
            let homeVC = HomeVC(nibName: "HomeVC", bundle: .main)
            window?.rootViewController = NavVC(rootViewController: homeVC)
        }

        return true
    }
}
